//
//  DetailVC.m
//  诗词鉴赏
//
//  Created by Steven on 2019/7/23.
//  Copyright © 2019 Steven. All rights reserved.
//

#import "DetailVC.h"

@interface DetailVC ()
@property(nonatomic, weak)IBOutlet UILabel *authorLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UIView *fanyiContainer;
@property (weak, nonatomic) IBOutlet UIView *zhushiContainer;
@property (weak, nonatomic) IBOutlet UIView *shagnxiContainer;
@property (weak, nonatomic) IBOutlet UIImageView *authorImage;

@property (weak, nonatomic) IBOutlet UILabel *fanyiLabel;
@property (weak, nonatomic) IBOutlet UILabel *zhushiLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@property (weak, nonatomic) IBOutlet UILabel *shangxiLabel;
@end

@implementation DetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.authorLabel.text = self.model.title;
    self.descLabel.text = [NSString stringWithFormat:@"%@【%@】", self.model.author, self.model.chaodai];
    self.contentLabel.text = self.model.content;
    self.fanyiLabel.text = self.model.fanyi;
    self.zhushiLabel.text = self.model.zhushi;
    
    self.authorImage.image = [UIImage imageNamed:self.model.author];
    
    if ([self.model.pingxi isKindOfClass:[NSNull class]]) {
        self.shagnxiContainer.hidden = YES;
    }else{
        self.shangxiLabel.text = self.model.pingxi;
    }
}



@end
